Render to texture

Here's the code from in class: